if (ENABLE_XFCE)
    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/appmenu.desktop DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/xfce4/panel/plugins)
endif()
if (ENABLE_MATE)
    add_schema("org.valapanel.appmenu.gschema.xml")
    configure_file(${CMAKE_SOURCE_DIR}/data/appmenu-mate.desktop.plugin.in ${CMAKE_SOURCE_DIR}/data/appmenu-mate.desktop.in)
    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/appmenu-mate.desktop DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/mate-panel/applets/ RENAME org.vala-panel.appmenu.mate-panel-applet)
endif()
if (ENABLE_VALAPANEL)
    add_schema("org.valapanel.appmenu.gschema.xml")
    configure_file(${CMAKE_SOURCE_DIR}/data/appmenu.desktop.plugin.in.cmake ${CMAKE_SOURCE_DIR}/data/appmenu.desktop.plugin.in @ONLY)
    if(NEW_IFACE)
        install(FILES ${CMAKE_CURRENT_BINARY_DIR}/appmenu.plugin DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/vala-panel/applets/ RENAME org.valapanel.appmenu.plugin)
    else()
        install(FILES ${CMAKE_CURRENT_BINARY_DIR}/appmenu.plugin DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/vala-panel/applets/)
    endif()
endif()
if (ENABLE_BUDGIE)
    add_schema("org.valapanel.appmenu.gschema.xml")
    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/appmenu-budgie.plugin DESTINATION ${CMAKE_INSTALL_LIBDIR}/budgie-desktop/plugins/budgie-vala-panel-appmenu-plugin)
endif()
